<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/2/26
 * Time: 14:27
 */

namespace App\Http\Traits;


use Illuminate\Http\Request;

trait DynamicCommentTrait
{
    use BaseTrait;
    // 验证秘钥
    protected $loginSession;
    // 评论内容
    protected $content;
    // 父评论ID
    protected $parent_id;
    // 动态ID
    protected $dynamic_id;
    // 动态评论ID
    protected $dynamic_comment_id;
    // 分页大小
    protected $limit;
    // 回复的用户ID
    protected $re_user_id;

    public function __construct(Request $request)
    {
        $this->loginSession = $request->input('loginSession', '');
        $this->content = $request->input('content', '');
        $this->parent_id = $request->input('parent_id', 0);
        $this->dynamic_id = $request->input('dynamic_id', 0);
        $this->dynamic_comment_id = $request->input('dynamic_comment_id', 0);
        $this->limit = $request->input('limit', 0);
        $this->re_user_id = $request->input('re_user_id', 0);
    }
}